package com.mygdx.game.part2;

import com.badlogic.gdx.math.Vector2;
import com.mygdx.game.part1.Constants;

/**
 * RunnerUserData
 * Created by 80002023 on 2016/8/15.
 */
public class RunnerUserData extends UserData {

    final Vector2 runningPosition = new Vector2(Constants.RUNNER_X, Constants.RUNNER_Y);
    final Vector2 dodgePosition = new Vector2(Constants.RUNNER_DODGE_X, Constants.RUNNER_DODGE_Y);
    Vector2 jumpingLinearImpulse;

    public RunnerUserData(float width,float height) {
        super(width,height);
        jumpingLinearImpulse = Constants.RUNNER_JUMPING_LINEAR_IMPULSE;
        userDataType = UserDataType.RUNNER;
    }

    public Vector2 getJumpingLinearImpulse() {
        return jumpingLinearImpulse;
    }

    public void setJumpingLinearImpulse(Vector2 jumpingLinearImpulse) {
        this.jumpingLinearImpulse = jumpingLinearImpulse;
    }

    public float getDodgeAngle() {
        return (float) (-90f * (Math.PI * 180f));
    }

    public Vector2 getRunningPosition() {
        return runningPosition;
    }

    public Vector2 getDodgePosition() {
        return dodgePosition;
    }

    public float getHitAngularImpulse(){
        return Constants.RUNNER_HIT_ANGULAR_IMPULSE;
    }
}
